#include <stdio.h>
#include <stdlib.h>
#include "../Includes/Driver.h"
#include <unistd.h>

/// <summary>
/// Locals
/// </summary>
static int display_count = 0;
static Display displays[GAL_MAX_DISPLAYS];

/// <summary>
/// TODO
/// </summary>
int DSPInit(DriverPtr drv)
{
	if (drv == NULL)
		return -1;

	if (display_count >= GAL_MAX_DISPLAYS)
		return -2;

	displays[display_count].x = 0;
	displays[display_count].y = 0;
	displays[display_count].width = 100;
	displays[display_count].height = 100;
	displays[display_count].state = 1;
	displays[display_count].drv = drv;
	display_count++;

	return 0;
}

/// <summary>
/// TODO
/// </summary>
int DSPGetMode(int dID, int mID)
{
	return 0;
}

/// <summary>
/// TODO
/// </summary>
int DSPGetFramebuffer(int dID)
{
	return 0;
}

/// <summary>
/// TODO
/// </summary>
int DSPSetGamma(void)
{
	//if (red == NULL || green == NULL || blue == NULL)
	//	return -1;

	return 0;
}

/// <summary>
/// TODO
/// </summary>
int DSPGetCount()
{
	return display_count;
}

/// <summary>
/// TODO
/// </summary>
int DSPExit(void)
{
	return 0;
}
